<script type="text/javascript">
    RED.nodes.registerType('cell',{
        category: 'Spreadsheet',
        color: "#DEBD5C",
        defaults: {
            name: {value:""},
            address: {value:""},
            dataType: {value:"w"}
        },
        inputs:1,
        outputs:1,
        icon: "font-awesome/fa-square-o",
        label: function() {
            return this.name||"cell";
        },
        labelStyle: function() {
            return this.name?"node_label_italic":"";
        },
        inputLabels: function() {
            return this._("cell.label.sheetObject");
        },
        outputLabels: function () {
            return this._("cell.label.cellValue");
        }
    });
</script>

<script type="text/x-red" data-template-name="cell">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
        <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
    </div>
    <div class="form-row">
        <label for="node-input-address"><i class="fa fa-crosshairs"></i> <span data-i18n="cell.label.address"></span></label>
        <input type="text" id="node-input-address" data-i18n="[placeholder]cell.placeholder.address">
    </div>
    <div class="form-row">
        <label for="node-input-dataType"><i class="fa fa-sign-out"></i> <span data-i18n="cell.label.dataType"></span></label>
        <select id="node-input-dataType" style="width:70%">
            <option value="v" data-i18n="cell.dataType.v"></option>
            <option value="w" data-i18n="cell.dataType.w"></option>
            <option value="t" data-i18n="cell.dataType.t"></option>
            <option value="f" data-i18n="cell.dataType.f"></option>
            <option value="F" data-i18n="cell.dataType.F"></option>
            <option value="h" data-i18n="cell.dataType.h"></option>
            <option value="c" data-i18n="cell.dataType.c"></option>
            <option value="z" data-i18n="cell.dataType.z"></option>
            <option value="l" data-i18n="cell.dataType.l"></option>
            <option value="s" data-i18n="cell.dataType.s"></option>
            <option value="" data-i18n="cell.dataType.none"></option>
        </select>
    </div>
</script>
